Page({
  data: {
    patients: [
      { id: 1, name: '张三', age: 35, gender: '男', lastVisit: '上次随访 2025-09-10', avatar: '/assets/images/avatar1.jpg' },
      { id: 2, name: '李四', age: 29, gender: '女', lastVisit: '上次随访 2025-09-08', avatar: '/assets/images/avatar2.jpg' }
    ]
  },
  openPatient(e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({ url: `/pages/doctor/patientDetail/patientDetail?id=${id}` });
  },
  openChat(e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({ url: `/pages/doctor/chat/chat?doctorId=1&consultationId=${Date.now()}&patientId=${id}` });
  }
});

